<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:ui="http://java.sun.com/jsf/facelets" 
      xmlns:h="http://java.sun.com/jsf/html" 
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:gp="http://gp.componentes.jsf"
      xmlns:c="http://java.sun.com/jsp/jstl/core"
      xmlns:p="http://primefaces.org/ui">
      
      <ui:composition> 
	
		<ui:insert> </ui:insert>
		
		<script type="text/javascript" src="#{facesContext.externalContext.requestContextPath}/resources/componentes/slider/js/slider.js"></script>
      
      	<script type="text/javascript">

      	var json = "";

      //-- --------------------------------------- animate ------------------------------- -->
		 
		  <c:if test="#{not empty animate}">
		  
		  	var animate= #{animate};
		   	json = $.extend(json,{"animate":animate}); 
		   	
		  </c:if>

		  //-- --------------------------------------- disabled ----------------------------- -->

		  <c:if test="#{not empty disabled}">
		  
		  	var disabled= #{disabled};
		   	json = $.extend(json,{"disabled":disabled}); 
		   	
		  </c:if>

		  //-- --------------------------------------- orientation --------------------------- -->

		  <c:if test="#{not empty orientation}">
		  
		  	var orientation= #{orientation};
		   	json = $.extend(json,{"orientation":orientation}); 
		   	
		  </c:if>

		  //-- --------------------------------------- max ------------------------------------ -->

		  <c:if test="#{not empty max}">
		  
		  	var max= #{max};
		   	json = $.extend(json,{"max":max}); 
		   	
		  </c:if>

		  //-- --------------------------------------- min ------------------------------------- -->

		  <c:if test="#{not empty min}">
		  
		  	var min= #{min};
		   	json = $.extend(json,{"min":min}); 
		   	
		  </c:if>

		  //-- ------------------------------- range ------------------------------------- -->

		  <c:if test="#{not empty range}">
		  
		  	var range= #{range};
		   	json = $.extend(json,{"range":range}); 
		   	
		  </c:if>

		  //-- --------------------------------------- value --------------------------------------- -->

		  <c:if test="#{not empty value}">
		  
		  	var value = #{value};
		   	json = $.extend(json,{"value":value}); 
		   	
		  </c:if>

		  //-- --------------------------------------- values --------------------------------------- -->

		  <c:if test="#{not empty values}">
		  
		  	var values = #{values};
		  	var values2 = #{values2};
		   	json = $.extend(json,{"values": [values,values2]}); 
		   	
		  </c:if>

		  //-- --------------------------------------- step --------------------------------------- -->

		  <c:if test="#{not empty step}">
		  
		  	var step= #{step};
		   	json = $.extend(json,{"step":step}); 
		   	
		  </c:if>

		  //-- --------------------------------------- Metodos ------------------------------------- -->

			slider.gerarSlider("##{form} ##{id}", json);
			slider.chanceSlider("##{form} ##{id}","##{form} ##{idText}");

      	</script>
      
      </ui:composition>   
   
</html>